<template>
  <div>
    子组件
    <hr />
    <slot name="pre"></slot>
    <hr />
    <slot></slot>
  </div>
</template>

<script setup>
import { useAttrs, useSlots } from "vue";

const slots = useSlots();
const attrs = useAttrs();
console.log(slots);
console.log(attrs);
</script>
<style scoped>
button {
  padding: 20px 20px;
  background-color: pink;
}
</style>
